<?php

namespace app\admin\validate\news;

use think\Validate;

class Article extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'tid' => 'require|gt:1',
        'title' => 'require',
    ];
    /**
     * 提示消息
     */
    protected $message = [
        'tid.gt' => '请选择文章所属分类',
        'title.require' => '请填写标题',
        
    ];
    /**
     * 验证场景
     */
    protected $scene = [
        'add'  => ['tid','title'],
        'edit' => ['tid','title'],
    ];
    
}
